<!DOCTYPE html>
<html lang="ch">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" type="text/css" href="css/main.css" />
		<script src="js/config.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
		<script src="js/mui.min.js"></script>
		<title></title>
	</head>

	<body>
		<div class="nav_con">
			<img class="nav_icon float_l" src="img/nav_icon_bar@2x.png" onclick="backinfo()">消息
			<div class="clear"></div>
		</div>
		<div class="cd_nr">
			<div class="notice_con">
				<div class="notice">
					<div class="notice_portrait_con float_l">
						<p style="color: #ffffff; line-height: 48px" id="p1"></p>
					</div>
					<div class="notice_r float_l">
						<p class="notice_title " id="p3"></p>
						<p class="notice_det" id="p2"></p>
						<p hidden="hidden" id="p4"></p>
					</div>
					<div class="clear"></div>
				</div>
				<div class="notice_all_fen"></div>
				<div class="notice_all">
					<p id="p5">
					</p>
				</div>
			</div>
		</div>

	</body>
	<script>
		var token = localStorage.getItem("key")
		//var token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI1NSIsImlhdCI6MTU3MDc1OTE3MSwiZXhwIjoxNTcxMzYzOTcxfQ.Sre32f2jFV9dcKMAgKafHUmTnP103ljU-oMKK62De5LH7eK4zk4edIUsx3ZGD5Ib1jllRHVa1tpTEoxVgjvK4g';		
		GetRequest();
		var msgTitle = null;
		var msgTime =null;
		var msgId = null;
		function GetRequest() { 
		   var url = location.search; //获取url中"?"符后的字串 
		   var theRequest = new Object();
		   var urls = null;
		   var str = null;
		   if (url.indexOf("?") != -1) { 
		      str = url.substr(1);
		      urls = decodeURI(str);
		      var title = null;
		      var time = null;
		      var id = null;
		      if(urls!=null){
		      	 var s = urls.split("&");		      	 
				 title = s[0].split("=");
				 time = s[1].split("=");
				 id = s[2].split("=");
		      }		     
		      msgTitle = title[1];
		      msgTime = time[1];
		      msgId = id[1];
		      $("#p1").html(msgTitle);
		      $("#p2").html(msgTime);
		      $("#p3").html(msgTitle+"消息");
		      $("#p4").html(msgId);
		   }  		
   	    };
   	    getinformationDetails();
   	    function getinformationDetails(){
   	    	var mId = $("#p4").html();
   	    	$.ajax({
	            type: "POST",
	            url: url_prefix + "home/informationDetails",
	            data: {
	            	request: JSON.stringify({
						"token":token,
						"msgId":mId
					})   
	            },
	            dataType: "json",
	            success: function(data){   
	            	if(data.code == '200'){
	            		var msgContext = data.result.msgContext
	            		$("#p5").html(msgContext);
	            	}else if (data.code == '300'){
						mui.toast("帐号在其他设备上登录")
						window.location.href="fastLogin.html"
					}else{
		        		mui.toast("连接服务器失败,请稍后重试``````");
		       		}
	            }
	       });
   	    };
   	    function backinfo(){
   	    	window.location.href = 'message.html'
   	    }
	</script>
</html>